.single-category {
  min-height: 30rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.back {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 1rem;
  flex-wrap: wrap;
}

.back a {
  border-right: 1px solid #dbdada;
  padding-right: 1rem;
  font-weight: 500;
}

.back a:last-child {
  padding-right: 0;
  border-right: none;
}

.single-category .row {
  display: flex;
  align-items: start;
  justify-content: start;
  gap: 1rem;
  padding-top: 1rem;
}

.row__left {
  width: 30%;
}

.row__left .sub-categories {
  padding: 1rem;
  background-color: #f7f7f7;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.row__left .special-offers img {
  width: 100%;
  height: 8rem;
  object-fit: cover;
  border-radius: 4px;
}

.row__left .header {
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1.2rem;
}

.row__left ul {
  list-style: none;
}

.row__left ul li:not(:last-child) {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #fff;
}

.row__right {
  width: 70%;
}

.row__right .filters {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.row__right .filters .sort {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 0.25rem;
}

.row__right .filters .sort .label {
  font-weight: 600;
  font-size: 0.9rem;
}

.row__right .filters .sort select {
  border: none;
  outline: none;
}

.row__right .products-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 1rem;
}

.cat-card {
  width: 100%;
  padding: 0.25rem;
  border: 1px solid #eee;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
}

.cat-card img {
  width: 100%;
  height: 8rem;
  object-fit: contain;
  border-radius: 4px;
}

.cat-card .info {
  padding: 0.3rem 0.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-card .info .name {
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.cat-card .info .price {
  font-size: 0.9rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.cat-card:hover {
  transform: scale(1.03);
  border-color: var(--secondary-color);
}

.cat-card .description {
  position: absolute;
  bottom: 0.25rem;
  left: 0.25rem;
  right: 0.25rem;
  background-color: white;
  padding: 0.25rem;
  display: none;
}

.cat-card:hover .description {
  display: block;
  transition: all 0.3s ease;
  color: rgb(74, 74, 74);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  font-size: 0.75rem;
}

.cat-card:hover .info .price {
  position: absolute;
  top: 0px;
  right: 0px;
  background-color: var(--secondary-color);
  padding: 0.25rem;
  font-weight: bold;
  font-size: 1rem;
  color: white;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.pagination button {
  padding: 5px 10px;
  cursor: pointer;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  transition: background-color 0.3s;
}

.pagination button:disabled {
  cursor: not-allowed;
  background-color: #e9e9e9;
}

.pagination .page-info {
  font-size: 14px;
}

@media only screen and (max-width: 997px) {
  .row {
    flex-direction: column-reverse;
  }

  .sm-row {
    flex-direction: row !important;
  }

  .row__left {
    width: 100%;
    display: flex;
    align-items: start;
    justify-content: start;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .row__right {
    width: 100%;
  }

  .row__right h2 {
    font-size: 1.3rem;
  }
  .row__right .products-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .row__left .header {
    font-size: 1rem;
  }
}

@media only screen and (max-width: 700px) {
  .row__right h2 {
    font-size: 1.2rem;
  }

  .row__right .products-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (max-width: 560px) {
  .row__right h2 {
    font-size: 1.1rem;
  }

  .row__right .filters {
    flex-direction: column;
    align-items: start;
    justify-content: start;
    gap: 0.5rem;
  }
}

@media only screen and (max-width: 360px) {
  .row__right .products-container {
    grid-template-columns: repeat(1, 1fr);
  }
}
