/* Main container */
.jr-ajax-filters {
  display: flex;
  gap: 40px;
  margin-top: 0;
  margin-bottom: 0;
}

/* Filter form sidebar */
.jr-ajax-filters-form {
  width: 218px;
}

/* Category list styling */

.jr-ajax-filters-form .jr-category-content,
.jr-ajax-filters-form .mobile-filter {
  background: #E5EDEA;
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 30px;
}
.jr-ajax-filters-form .mobile-filter {
    display: flex;
    justify-content: center;
    transition: all .1s ease-in-out;
    cursor: pointer;
}
.jr-ajax-filters-form .mobile-filter span {
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
  color: #333;
  padding: 0px;
}
.jr-ajax-filters-form .mobile-filter:hover {
  background: #ceddd8;
}
.jr-category-list-title {
  font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    color: #333;
    padding: 0px;
    padding-bottom: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid #A1A1A1;
}
.jr-ajax-filters-form ul.jr-category-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}
.jr-ajax-filters-form ul.jr-category-list li {
  margin-bottom: 0;
}

.jr-ajax-filters .jr-ajax-filters-form ul.jr-category-list li > a {
  display: block;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 10px 0;
    color: #333!important;
    justify-content: flex-start;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.jr-category-list a:hover,
.jr-category-list a.active {
  color: #00AEEF;
}

/* Sort section in results header */

.jr-results-head .jr-sort-section {
  float: right;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: none;
  margin: 0;
}

.jr-results-head .jr-sort-section label {
  display: inline;
  font-weight: 500;
  font-size: 14px;
  color: #333;
  margin: 0;
  white-space: nowrap;
}

.jr-results-head .jr-sort-select {
  width: auto;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.jr-results-head .jr-sort-select:focus {
  outline: none;
  border-color: #00aeef;
  box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.2);
}

/* Attribute groups */
.jr-attrs {
}

.jr-attr-group {
  padding: 0;
  margin-bottom: 25px;
}

.jr-attr-group legend {
  font-weight: bold;
  font-size: 16px;
  padding: 0;
  margin-bottom: 25px;
  color: #333;
}

label.jr-check {
  position: relative;
  font-size: 14px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  cursor: pointer;
  font-weight: normal;
}
.jr-check:hover {
  color: #000;
}
.jr-check input[type="checkbox"] {
  opacity: 0;
  position: absolute;
}
.jr-check > span {
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
    margin: 0;
    margin-right: 10px;
    padding: 0;
    width: 36px;
    height: 36px;
    border: 1px solid #ccc;
    position: relative;
    cursor: pointer;
}

.jr-check > span > i { color:transparent; font-size: 20px;}
.jr-check:has(input:checked) > span i{
  color: #000;
}
.jr-attr-group-line {
  width: 100%;
  height: 1px;
  background: #A1A1A1;
  margin-top: 20px;
}

/* Action buttons */
.jr-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.jr-apply,
.jr-reset {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.jr-apply {
  font-weight: bold;
  background-color: #ffdf25;
  color: #232323;
}

.jr-apply:hover {
  background-color: #e1c521;
}

.jr-reset {
  background-color: #f3efeb;
  color: #4e4e4e;
}

.jr-reset:hover {
  background-color: #ddd;
}

/* Products area */
.jr-ajax-filters-products {
  width: calc(100% - 218px);
  display: flex;
  flex-direction: column;
}

/* Results header */
.jr-results-head {
  float: left;
  width: 100%;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.jr-count {
  float: left;
  font-weight: 400;
  font-size: 12px;
  color: #333;
}

.jr-loading {
  color: #0073aa;
  font-style: italic;
  float: left;
  width: 100%;
}

/* Products grid */
#jr-grid.ajax-products {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  margin-left: -18px;
  margin-right: -18px;
}

#jr-grid.ajax-products .ajax-product-item {
  width: 33.3333333%;
  padding: 18px;
  display: flex;
}

#jr-grid.ajax-products .ajax-product-item a {
  display: flex;
  flex-wrap: wrap;
}
#jr-grid.ajax-products .ajax-product-item .product-image {
  display: flex;
  flex-grow: 1;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 1;
  width: 100%;
}

#jr-grid.ajax-products .ajax-product-item .product-image img {
  width: 100%;
}

#jr-grid.ajax-products .ajax-product-item h3.product-title {
  width: 100%;
  margin-top: 0;
  margin-top: 0;
  font-size: 21px;
  line-height: 1.3;
  color: #333;
  /* flex-grow: 1; */
}
#jr-grid.ajax-products .ajax-product-item .product-price {
align-self: flex-end;
}

/* Error messages */
.jr-error {
  color: #d63638;
  background-color: #fcf0f1;
  border: 1px solid #d63638;
  border-radius: 4px;
  padding: 15px;
  margin: 20px 0;
}

.jr-no-results {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 40px 20px;
  background-color: #f9f9f9;
  border-radius: 4px;
}

/* Load more button */
.jr-load-more {
  display: flex;
  padding: 12px 32px;
  align-items: flex-start;
  margin: 20px 0;
  color: white;
  border: none;
  border-radius: 36px;
  background: #00AEEF;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.jr-load-more:hover {
  background-color: #005a87;
}
/* Active filters */
.jr-active-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.jr-active-list .jr-filter-pill {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  padding: 4px 16px;
  border-radius: 16px;
  border: 1px solid rgba(161, 161, 161, 0.20);
  background: #FFF;
  color: #000;
  font-family: "Open Sans";
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  cursor: pointer;
}
.jr-active-list .jr-filter-pill .close {
  display: block;
  position: relative;
  height: 14px;
  width: 14px;
  transform: rotate(46deg);
}
.jr-active-list .jr-filter-pill .close::before,
.jr-active-list .jr-filter-pill .close::after {
  content: "";
  background: #000;
  height: 100%;
  width: 1px;
  position: absolute;
  left: 0;
  top: 0;
}
.jr-active-list .jr-filter-pill .close::before {
    transform: rotate(-91deg);
}
.jr-ajax-filters-form .mobile-filter {
  display: none;
}
/* Responsive design */
@media (max-width: 1100px) {
  #jr-grid.ajax-products .ajax-product-item {
    width: 50%;
  }
}
@media (max-width: 980px) {
  .jr-ajax-filters {
    flex-direction: column;
  }
  
  .jr-ajax-filters-form,
  .jr-ajax-filters-products {
    width: 100%;
  }
  
  .jr-actions {
    flex-direction: column;
  }
  
  .jr-price-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  
  .jr-price-wrap span {
    text-align: center;
    margin: 5px 0;
  }
  
  .jr-results-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .jr-results-head .jr-sort-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .jr-results-head .jr-sort-select {
    width: 100%;
    min-width: auto;
  }
  .jr-ajax-filters-form .mobile-filter {
    display: flex;
  }
  .mobile-filter-content {
    display: none;
  }
  .jr-category-list-title,
  .jr-ajax-filters .jr-ajax-filters-form ul.jr-category-list li > a,
  .jr-ajax-filters-form .mobile-filter span {
    font-size: 16px;
  }
  .jr-attr-group legend {
    font-size: 14px;
    margin-bottom: 15px;
  }
  .jr-check > span {
    border-radius: 6px;
    width: 28px;
    height: 28px;
  }
  #jr-grid.ajax-products .ajax-product-item h3.product-title {
    font-size: 16px;
    line-height: 1.3;
    padding: 0 0 5px;
  }
  .jr-active-list .jr-filter-pill {
    gap: 20px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 18px;
  }
  .ajax-product-item .product-price {
    font-size: 14px;
  }
  .jr-ajax-filters-form .mobile-filter span.hide {
    display: none;
  }
  .jr-ajax-filters-form .mobile-filter.active span.show {
    display: none;
  }
  .jr-ajax-filters-form .mobile-filter.active span.hide {
    display: block;
  }
  .jr-active-list .jr-filter-pill .close {
    top: 2px;
  }
}

@media (max-width: 500px) {
  #jr-grid.ajax-products .ajax-product-item {
    width: 100%;
  }
}