/* --- Sidebar Filters Injection CSS --- */
.sidebar-filters-container {
  padding: 0 2rem 2rem 2rem;
  margin-top: 0.5rem;
  border-top: none;
}

/* --- Filter Accordion Styles --- */
.filter-group {
  padding: 1.25rem 0;
}

.filter-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-montserrat);
  font-weight: 700;
  color: var(--text-title);
  font-size: 1rem;
  user-select: none;
}

.dropdown-arrow {
  width: 14px;
  height: 14px;
  color: #6b7280;
  transition: transform 0.3s ease;
  transform: rotate(0deg); /* points down when collapsed */
}

.filter-group.active .dropdown-arrow {
  transform: rotate(180deg); /* points up when active */
}

.filter-group-content {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.filter-group.active .filter-group-content {
  display: flex;
}

/* --- Range Filter Input Box Styles --- */
.range-inputs {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.range-input-box {
  flex: 1;
  width: 50%;
  border: 1px solid #d1d5db;
  padding: 0.5rem;
  font-family: var(--font-montserrat);
  font-size: 0.875rem;
  border-radius: 4px;
  outline: none;
  background-color: white;
  color: var(--text-title);
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.range-input-box:focus {
  border-color: var(--primary-color);
}

/* --- Filter Action Buttons --- */
.filter-actions-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.filter-btn-apply {
  flex: 1;
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem;
  font-weight: 700;
  font-family: var(--font-montserrat);
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  font-size: 0.875rem;
}

.filter-btn-apply:hover {
  background-color: #00878a;
}

.filter-btn-reset {
  flex: 1;
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
  padding: 0.75rem;
  font-weight: 700;
  font-family: var(--font-montserrat);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.filter-btn-reset:hover {
  background-color: #e5e7eb;
}

/* --- Hero Section --- */
.catalog-hero {
  position: relative;
  width: 100%;
  min-height: 25rem; /* h-100 equivalent */
  display: flex;
  align-items: center;
  overflow: hidden;
  margin: 0; /* overrides align-wrapper's margin — belt-and-suspenders alongside
                templates no longer putting align-wrapper on this element */
}

@media (min-width: 768px) {
  .catalog-hero {
    height: 31.875rem; /* md:h-[127.5] */
  }
}

@media (min-width: 1024px) {
  .catalog-hero {
    height: 40rem; /* lg:h-[160] */
  }
}

.catalog-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.catalog-hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.catalog-hero-content-wrapper {
  position: relative;
  z-index: 20;
  padding: 0 0 0 1.5rem;
  width: 100%;
  color: white;
}

@media (min-width: 768px) {
  .catalog-hero-content-wrapper {
    padding-left: 3rem;
  }
}

@media (min-width: 1024px) {
  .catalog-hero-content-wrapper {
    padding-left: 4rem;
  }
}

.catalog-hero-content {
  max-width: 48rem;
}

.catalog-hero-title {
  font-family: var(--font-inter);
  font-size: 1.875rem; /* text-3xl */
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .catalog-hero-title {
    font-size: 3.25rem; /* md:text-5xl */
    margin-bottom: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .catalog-hero-title {
    font-size: 4.5rem; /* lg:text-7xl */
  }
}

.catalog-hero-subtitle {
  font-family: var(--font-inter);
  font-size: 1rem;
  color: #d1d5db; /* text-gray-300 */
  margin-top: 0;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .catalog-hero-subtitle {
    font-size: 1.25rem;
  }
}

/* --- Search Input inside Hero --- */
.catalog-search-block {
  position: relative;
  width: 100%;
  margin-top: 1rem;
}

.catalog-search-input {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 1rem;
  border: none;
  border-radius: 2px;
  font-family: var(--font-inter);
  font-size: 1.125rem;
  font-weight: 500;
  box-sizing: border-box;
  background-color: white;
  color: var(--text-title);
  outline: none;
}

.catalog-search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #9ca3af;
  pointer-events: none;
}

/* --- Breadcrumbs --- */
.catalog-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-inter);
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .catalog-breadcrumbs {
    font-size: 1.125rem; /* md:text-lg */
    margin-bottom: 2rem;
  }
}

.catalog-breadcrumbs a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.catalog-breadcrumbs a:hover {
  color: var(--primary-color);
}

.breadcrumb-separator {
  color: #9ca3af;
}

.breadcrumb-current {
  color: #111827;
  font-weight: 500;
}

/* --- Catalog Body Layout --- */
.catalog-body {
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .catalog-body {
    padding: 4rem 0;
  }
}

@media (min-width: 1024px) {
  .catalog-body {
    padding: 6rem 0;
  }
}

/* --- Grid & Product Cards --- */
.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .catalog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.catalog-card {
  background-color: white;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border: 1px solid #e5e7eb; /* border-gray-200 */
  box-sizing: border-box;
  transition: box-shadow 0.3s ease;
}

.catalog-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
  .catalog-card {
    padding: 1.5rem; /* md:p-6 */
    border: none;
  }
}

.catalog-card-image-wrapper {
  position: relative;
  width: 100%;
  height: 14rem;
  background-color: white;
  border: 2px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-sizing: border-box;
}

.catalog-card-image-wrapper img {
  max-height: 90%;
  max-width: 90%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.catalog-card.group:hover .catalog-card-image-wrapper img {
  transform: scale(1.05);
}

.catalog-card-title {
  font-family: var(--font-inter);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-title);
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .catalog-card-title {
    font-size: 1.25rem;
  }
}

.catalog-card-desc {
  font-family: var(--font-inter);
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.625;
  margin: 0;
  flex-grow: 1;
}

@media (min-width: 768px) {
  .catalog-card-desc {
    font-size: 1.125rem; /* md:text-lg */
  }
}

/* --- Pagination --- */
.catalog-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 4rem;
}

.catalog-pagination a,
.catalog-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  min-width: 2.25rem;
  font-family: var(--font-montserrat);
  font-size: 1rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
  border: none;
  background: transparent;
}

.catalog-pagination a:hover {
  color: var(--primary-color);
}

.catalog-pagination a.active {
  background-color: var(--primary-color);
  color: white;
  font-weight: 700;
  border-radius: 50%;
  height: 2.25rem;
  width: 2.25rem;
  padding: 0;
}

.catalog-pagination a.active:hover {
  color: white;
}

.catalog-pagination .pagination-arrow {
  font-weight: 600;
  color: #4b5563;
}

.pagination-dots {
  color: #9ca3af;
}

/* --- Mobile Filters Visibilities --- */
.mobile-filters-section {
  display: none;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  background-color: white;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .mobile-filters-section {
    display: block;
  }

  /* On mobile, we stack headers horizontally or accordion format */
  .mobile-filters-section .filters-container-inner {
    display: flex;
    flex-direction: column;
  }
}
