/** ============================================================== */
/** ========================= TOP FILTER ========================= */
/** ============================================================== */

.top-filter {
  font-family: "Montserrat", Sans-serif;
  padding-top: 25px;
  padding-bottom: 25px;
}

.top-filter__title {
  color: #042965;
  padding-inline: 18px;
  margin: 0 auto .7em;
  max-width: 1040px;
}

.top-filter__categories {
  margin-inline: auto;
  max-width: 1040px;
  position: relative;
  padding: 0 55px;
}

.top-filter--active .top-category-card:not(.top-category-card--active) {
  opacity: 0.5;
}

/** ========================= SWIPER STYLES ========================= */

.top-filter .swiper-slide {
  width: auto;
}

.top-filter .swiper-button-next,
.top-filter .swiper-button-prev {
  --swiper-navigation-size: 22px;
  background: #D7D7D7;
  color: #00588D;
  height: 40px;
  width: 40px;
  border-radius: 50%;
}


/** ======================= TOP CATEGORY CARD ======================= */

.top-category-card {
  display: grid;
  align-items: center;
  justify-items: center;
  grid-template-rows: auto;

  background-color: #D7D7D7;
  border-radius: 10px;
  color: #00588D;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  padding: 5px;

  height: 75px;
  width: 75px;

  transition: all 0.3s ease;
}

.top-category-card__text {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.top-category-card--active {
  background-color: #FECB37;
}

/* *********************** MEDIA MAX MOBILE 767 *********************** */

@media (max-width: 767px) {
  .top-category-card {
    font-size: 10px;
  }

  .top-category-card__image {
    width: 40px;
    height: 40px;
  }
}

/* *********************** MEDIA MIN MOBILE 768 *********************** */

@media (min-width: 768px) {
  .top-filter {
    padding-top: 55px;
    padding-bottom: 55px;
  }

  .top-filter__title,
  .top-filter__categories {
    padding: 0 70px;
  }

  .top-category-card {
    padding: 10px;
    height: 120px;
    width: 120px;
  }

  .top-filter__categories .swiper-button-next {
    right: 0;
  }

  .top-filter__categories .swiper-button-prev {
    left: 0;
  }

  .top-filter__categories .swiper-button-next,
  .top-filter__categories .swiper-button-prev {
    height: 55px;
    width: 55px;
  }
}

/* *********************** MEDIA MAX MOBILE 990 *********************** */

@media (max-width: 990px) {
  .top-filter__title {
    font-size: 14px;
  }
}


/** ============================================================== */
/** ======================= PRODUCTS RESULT ====================== */
/** ============================================================== */

.products-result {
  font-family: "Montserrat", Sans-serif;
  margin-inline: auto;
  max-width: 1140px;
}

.products-result__sidebar {
  border-right: 1px solid #D7D7D7;
}

.products-result__body a {
  text-decoration: none;
}

.products-result__title {
  color: #042965;
  padding-inline: 18px;
  margin-top: 0;
  margin-bottom: 10px;
}

/** ======================= PRODUCT CARD ======================= */

.products-result__body {
  padding: 15px 0;
}

.products-result__body .pl-product .pl-title {
  color: #343434 !important;
  font-weight: 600 !important;
  text-transform: uppercase;
}

.products-result__body .pl-product .pl-excerpt {
  color: #343434 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.products-result__body .pl-product img {
  object-fit: contain;
  height: auto;
  max-height: 200px;
}

/** =========================== DIVIDER =========================== */

.divider {
  margin: 0;
  border-color: #D7D7D7;
  border-top: 0;
}

/** ======================= SIDEBAR FILTER ======================= */

.sidebar-filter__section {
  min-width: 0;
  padding: 10px 20px;
}

.sidebar-filter__section--hide {
  display: none;
}

.sidebar-filter__title {
  color: #042965;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
}

/** ======================= CATEGORY TAG ======================= */

.category-tag {
  border: 1px solid #042965;
  border-radius: 5px;
  color: #042965;
  font-weight: 600;
  max-width: 100%;
  padding: 5px 30px 5px 10px;
  position: relative;
}

.category-tag__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.category-tag__delete {
  cursor: pointer;
  display: block;
  width: 15px;
  height: 15px;

  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 5px;
}

.category-tag__delete::before,
.category-tag__delete::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background-color: #042965;
  transform-origin: center;
}

.category-tag__delete::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.category-tag__delete::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/** ======================= SIDEBAR CATEGORIES ======================= */

.sidebar-categories {
  color: #042965;
}

.sidebar-categories ul {
  list-style: none;
  padding: 0;
}

.sidebar-categories p {
  margin: 0;
  padding: 5px 0;
}

.sidebar-categories__first-level {
  padding: 5px 0;
}

.sidebar-categories__title {
  border-bottom: 1px solid #042965;
  font-size: 16px;
  margin: 0;
  padding-bottom: 15px;
}

.sidebar-categories__buttons {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 1px solid #042965;
}

/** ======================= FILTER BUTTON ======================= */

.filter-button {
  cursor: pointer;
  background-color: #042965;
  border: none;
  border-radius: 5px;
  color: white;
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  opacity: .5;
  padding: 5px 15px;
  text-decoration: none;
}

.filter-button--secondary {
  background-color: #FCDC00;
  color: #042965;
  opacity: 1;
}

.filter-button--tertiary {
  background-color: #1895D1;
  opacity: 1;
}

/** ======================= SUBCATEGORY LIST ======================= */

#subcategory-list .category-tag+.category-tag {
  margin-top: 8px;
}

/** ======================= FILTER CHECKBOX ======================= */

.filter-checkbox {
  display: grid;
  grid-template-columns: 15px 1fr;
  gap: 15px;
  padding: 3px 0;
}

.filter-checkbox__input {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #1895D1;
  border-radius: 4px;

  height: 15px;
  width: 15px;
}

.filter-checkbox__input:checked {
  position: relative;
}

.filter-checkbox__input:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 3px;
  height: 7px;
  border-right: 1px solid #1895D1;
  border-bottom: 1px solid #1895D1;
}

/* *********************** MEDIA MIN MOBILE 768 *********************** */

@media (min-width: 768px) {

  .products-result__body,
  .products-result__sidebar {
    padding: 15px 25px;
  }
}

/* *********************** MEDIA MAX MOBILE 990 *********************** */

@media (max-width: 990px) {
  .sidebar-filter {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .sidebar-filter .sidebar-filter__title {
    display: none;
  }

  .sidebar-filter__section:last-of-type {
    grid-area: auto / 1 / auto / span 2;
  }

  .sidebar-categories {
    color: #042965;
    background-color: #343434c9;
    position: fixed;
    inset: 0;
    z-index: 15;
  
    display: flex;
    align-items: flex-end;
    transition: opacity 0.5s ease;
  }
  
  .sidebar-categories:not(.sidebar-categories--active) {
    opacity: 0;
    pointer-events: none;
  }

  .sidebar-categories__body {
    background-color: #fff;
    border-radius: 20px 20px 0 0;
    display: grid;
    height: 60%;
    width: 100%;
    margin: 0;
    padding: 25px;
    transition: transform 0.5s ease;
    transform: translateY(100%);
  }

  .sidebar-categories--active .sidebar-categories__body {
    transform: translateY(0);
  }
  
  .sidebar-categories .sidebar-categories__list {
    overflow: auto;
    margin: 0;
    padding: 10px 0;
  }

  .clear-filter--desk {
    display: none;
  }

  .filter-checkbox {
    display: block;
  }

  .filter-checkbox__input {
    display: none;
  }

  .filter-checkbox__label {
    display: block;
    border: 1px solid #042965;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    padding: 5px 15px;
  }

  .filter-checkbox__input:checked+.filter-checkbox__label {
    background-color: #CDD4E0;
    border-width: 2px;
  }

  .category-tag__text {
    font-size: 14px;
  }

  .no-results {
    padding-inline: 18px;
  } 
}

/* *********************** MEDIA MIN MOBILE 991 *********************** */

@media (min-width: 991px) {
  .products-result--filtered {
    display: grid;
    grid-template-columns: 300px 1fr;
  }

  .products-result:not(.products-result--filtered) .products-result__sidebar {
    display: none;
  }

  .sidebar-filter__section {
    padding: 5px 0;
  }

  .sidebar-categories__buttons,
  .sidebar-categories .sidebar-filter__title {
    display: none;
  }

  .clear-filter--desk {
    margin-top: 20px;
  }

  #collapse-filter-button {
    display: none;
  }
}
.sidebar-categories__second-level {
    margin-left: 15px;
}

.sidebar-categories__third-level {
    margin-left: 30px;
    list-style: circle;
}