* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  direction: rtl;
  background: #f5f5f5;
  min-height: 100vh;
}
.category-page {
  width: 100%;
  padding: 30px 20px 40px;
  background: #f2f2f2;
}

.category-title {
  text-align: center;
  margin-bottom: 24px;
}

.category-title h2 {
  font-size: 34px;
  font-weight: 800;
  color: #02482c;
  margin: 0;
}

.category-layout {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

/* sidebar */
.filters-sidebar {
  background: #f7f7f7;
  border-radius: 14px;
  padding: 16px;
  position: sticky;
  top: 20px;
}

.filters-header {
  margin-bottom: 18px;
}

.filters-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #2b2b2b;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.selected-filters-btn {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #7d7d7d;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.filter-box {
  padding: 14px 0;
  border-bottom: 1px solid #e8e8e8;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: #4b4b4b;
  font-size: 14px;
  font-weight: 600;
}

.toggle-row:last-child {
  margin-bottom: 0;
}

.toggle-switch {
  width: 48px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: #dcdcdc;
  position: relative;
  cursor: pointer;
  transition: 0.25s ease;
}

.toggle-switch::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  right: 3px;
  transition: 0.25s ease;
}

.toggle-switch.active {
  background: #2b67ff;
}

.toggle-switch.active::before {
  right: 23px;
}

/* price */
.price-range {
  position: relative;
  margin-bottom: 20px;
  height: 34px;
}

.range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.range-input::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #02482c;
  border: none;
  cursor: pointer;
  pointer-events: auto;
}

.range-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2b67ff;
  border: none;
  cursor: pointer;
  pointer-events: auto;
}

.range-input::-webkit-slider-runnable-track {
  height: 4px;
  background: #d7d7d7;
  border-radius: 999px;
}

.range-input::-moz-range-track {
  height: 4px;
  background: #d7d7d7;
  border-radius: 999px;
}

.price-label {
  font-size: 14px;
  color: #5d5d5d;
  margin-bottom: 8px;
}

.price-input-box {
  height: 42px;
  border-radius: 10px;
  background: #ececec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  margin-bottom: 12px;
  color: #555;
  font-size: 14px;
  font-weight: 700;
}

/* accordion */
.accordion-filter {
  border-bottom: 1px solid #e8e8e8;
}

.accordion-header {
  width: 100%;
  border: none;
  background: transparent;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #3d3d3d;
  font-size: 15px;
  font-weight: 700;
}

.accordion-header i {
  transition: 0.25s ease;
}

.accordion-filter.open .accordion-header i {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: 0.3s ease;
  padding: 0;
}

.accordion-filter.open .accordion-body {
  max-height: 220px;
  overflow-y: auto;
  padding-bottom: 14px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
  cursor: pointer;
}

.check-row input {
  width: 16px;
  height: 16px;
}

.clear-all-filters {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 14px;
  background: #02482c;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 18px;
}

/* content */
.products-content {
  min-width: 0;
}

.sort-bar {
  background: #eaeaea;
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.sort-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sort-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #2d2d2d;
  font-weight: 800;
  font-size: 14px;
}

.sort-item {
  border: none;
  background: transparent;
  color: #555;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.sort-item.active {
  color: #02482c;
}

.sort-count {
  color: #666;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* products */
.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.catalog-card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 10px;
  position: relative;
  transition: 0.2s ease;
}

.catalog-card:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.favorite-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #b7b7b7;
  cursor: pointer;
  z-index: 2;
}

.favorite-btn.active,
.favorite-btn:hover {
  color: #ff5a7d;
}

.catalog-image {
  width: 100%;
  aspect-ratio: 1 / 1.45;
  overflow: hidden;
  border-radius: 8px;
  background: #f3ede5;
  margin-bottom: 10px;
}

.catalog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  line-height: 1.9;
  min-height: 54px;
  margin: 0 0 10px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9a9a9a;
  font-size: 12px;
  margin-bottom: 12px;
  gap: 8px;
}

.catalog-price {
  color: #333;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
}

.buy-btn {
  width: 100%;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: #02482c;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  border: none;
  border-radius: 4px;
  background: #f0f0f0;
  color: #333;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 10px;
}

.page-btn.active,
.page-btn:hover {
  background: #02482c;
  color: #fff;
}

/* responsive */
@media (max-width: 1300px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1100px) {
  .category-layout {
    grid-template-columns: 250px 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .category-layout {
    grid-template-columns: 1fr;
  }

  .filters-sidebar {
    position: static;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .category-page {
    padding: 20px 12px 30px;
  }

  .category-title h2 {
    font-size: 24px;
  }

  .sort-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .catalog-title {
    min-height: auto;
  }
}
.catalog-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.catalog-card-link:visited,
.catalog-card-link:hover,
.catalog-card-link:active,
.catalog-card-link:focus {
  color: inherit;
  text-decoration: none;
}

.catalog-card-link .catalog-card {
  height: 100%;
  transition: 0.25s ease;
}

.catalog-card-link:hover .catalog-card {
  transform: translateY(-4px);
}

.catalog-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.filter-count {
  color: #777;
  font-size: 12px;
  margin-right: 6px;
}

.shop-filter-form {
  display: grid;
  gap: 14px;
}

.apply-filters-btn {
  width: 100%;
  border: none;
  background: #02482c;
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
}

.apply-filters-btn:hover {
  background: #036b40;
}

.clear-all-filters {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  margin-left: 8px;
  font-size: 13px;
}

.empty-products {
  grid-column: 1 / -1;
  background: #fff;
  padding: 30px;
  border-radius: 14px;
  text-align: center;
  color: #666;
}
.catalog-card {
  display: flex;
  flex-direction: column;
}

.catalog-price {
  min-height: 28px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.price-current {
  color: #02482c;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.8;
}

.old-price {
  color: #9a9a9a;
  font-size: 12px;
  font-weight: 600;
  text-decoration: line-through;
  margin-left: 4px;
}

.free-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9f7ef;
  color: #02482c;
  border: 1px solid #cdebd9;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 800;
}

.buy-btn {
  width: 100%;
  min-height: 32px;
  height: auto;
  padding: 7px 10px;
  margin-top: auto;
  border-radius: 10px;
  background: linear-gradient(135deg, #02482c, #036b40);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(2, 72, 44, 0.18);
  transition: 0.25s ease;
}

.catalog-card-link:hover .buy-btn {
  background: linear-gradient(135deg, #036b40, #048f55);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(2, 72, 44, 0.24);
}