main{
  max-width: 1400px !important;
}

.results-empty[hidden],
.filters-backdrop[hidden],
#size_modal[hidden]{
  display:none;
}

.search-summary{
  font-size: 15px;
  color: rgba(15,23,42,.86);
  line-height: 1.4;
}

.search-summary-q{
  font-weight: 800;
  color: rgba(15,23,42,.95);
}

.search-summary-count{
  color: rgba(15,23,42,.65);
}

.search-layout{
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: start;
}

.search-filters{
  position: sticky;
  top: 95px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.filters-head{
  display: none;
  height: 56px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
}

.filters-title{
  font-size: 15px;
  font-weight: 800;
  color: rgba(15,23,42,.92);
}

.filters-close{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  color: rgba(15,23,42,.70);
  font-size: 0;
  padding: 0;
}

.filters-close::before,
.filters-close::after{
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.filters-close{
  position: relative;
}

.filters-close::before{
  transform: rotate(45deg);
}

.filters-close::after{
  transform: rotate(-45deg);
}

.filters-close:hover{
  background: rgba(15,23,42,.04);
  border-color: rgba(15,23,42,.08);
  color: rgba(15,23,42,.92);
}

.filters-close:active{
  transform: translateY(1px);
}

.filters-close:focus-visible{
  outline: 2px solid rgba(15,23,42,.25);
  outline-offset: 2px;
}

.filters-body{
  padding: 0;
}

.filter-block{
  padding: 14px;
  background: #fff;
}

.filter-block + .filter-block{
  border-top: 1px solid var(--border);
}

.filter-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.filter-title{
  font-size: 14px;
  font-weight: 800;
  color: rgba(15,23,42,.92);
}

.filter-value{
  font-size: 13px;
  color: rgba(15,23,42,.65);
  white-space: nowrap;
}

.range-wrap{
  position: relative;
  height: 40px;
  padding: 10px 2px 0;
}

.range-track{
  position: absolute;
  left: 2px;
  right: 2px;
  top: 18px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15,23,42,.10);
}

.range-fill{
  height: 6px;
  border-radius: 999px;
  background: rgba(15,23,42,.35);
  width: 0%;
  margin-left: 0%;
}

.range{
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: 28px;
  width: 100%;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.range::-webkit-slider-runnable-track{
  height: 6px;
  background: transparent;
  border: 0;
}

.range::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.25);
  box-shadow: 0 1px 2px rgba(15,23,42,.08);
  pointer-events: auto;
  cursor: pointer;
  margin-top: -6px;
}

.range:focus::-webkit-slider-thumb{
  border-color: rgba(15,23,42,.55);
}

.range::-moz-range-track{
  height: 6px;
  background: transparent;
  border: 0;
}

.range::-moz-range-thumb{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.25);
  box-shadow: 0 1px 2px rgba(15,23,42,.08);
  pointer-events: auto;
  cursor: pointer;
}

.range::-moz-range-progress{
  background: transparent;
}

.filter-categories{
  display: block;
}

.category-list{
  max-height: 290px;
  overflow: auto;
  padding-right: 2px;
}

.category-item{
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
}

.category-item:hover{
  background: rgba(15,23,42,.04);
}

.category-item input{
  width: 16px;
  height: 16px;
}

.category-item span{
  font-size: 14px;
  color: rgba(15,23,42,.85);
}

.category-count{
  font-size: 12px;
  color: rgba(15,23,42,.55);
}

.search-results{
  min-width: 0;
}

.results-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.filters-toggle{
  display: none;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
  color: rgba(15,23,42,.85);
}

.filters-toggle:hover{
  background: rgba(15,23,42,.04);
}

.sort-wrap{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sort-select,
.page-select{
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0 42px 0 14px;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: rgba(15,23,42,.88);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%230f172a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
}

.sort-select:focus,
.page-select:focus{
  border-color: rgba(15,23,42,.50);
}

.product-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 18px;
}

.product-card{
  position: relative;
  background: transparent;
  border: 0;
}

.product-link{
  display: block;
}

.product-media{
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(15,23,42,.04);
  overflow: hidden;
}

.product-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-media .img-2{
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .18s ease;
}

.product-card:hover .product-media .img-2{
  opacity: 1;
}

.product-placeholder{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,.05);
}

.product-body{
  padding: 10px 0 0;
  text-align: center;
}

.product-name{
  font-size: 14px;
  font-weight: 400;
  color: rgba(15,23,42,.90);
  line-height: 1.35;
}

.product-price{
  margin-top: 6px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  justify-content: center;
}

.price-old{
  font-size: 13px;
  color: rgba(15,23,42,.55);
  text-decoration: line-through;
}

.price-now{
  font-size: 14px;
  color: rgba(15,23,42,.90);
  font-weight: 800;
}

.price-now.is-offer{
  color: #b91c1c;
}

.add-to-cart{
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  top: auto;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.92);
  color: rgba(15,23,42,.92);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, background .16s ease, border-color .16s ease;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.product-card:hover .add-to-cart{
  opacity: 1;
  transform: translateY(0);
}

.add-to-cart:hover{
  background: rgba(15, 23, 42, 0.04);
}

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

.page-btn{
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
  color: rgba(15,23,42,.85);
}

.page-btn:hover{
  background: rgba(15,23,42,.04);
}

.page-btn:disabled{
  opacity: .45;
  cursor: default;
}

.results-empty{
  margin-top: 16px;
  color: rgba(15,23,42,.70);
}

#size_modal{
  position: fixed;
  inset: 0;
  z-index: 200;
}

.size-modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.35);
}

.size-modal-panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 92vw);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.size-modal-head{
  height: 56px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.size-modal-title{
  font-size: 15px;
  font-weight: 800;
  color: rgba(15,23,42,.92);
}

.size-modal-close{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  color: rgba(15,23,42,.70);
  font-size: 0;
  padding: 0;
  position: relative;
}

.size-modal-close::before,
.size-modal-close::after{
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.size-modal-close::before{
  transform: rotate(45deg);
}

.size-modal-close::after{
  transform: rotate(-45deg);
}

.size-modal-close:hover{
  background: rgba(15,23,42,.04);
  border-color: rgba(15,23,42,.08);
  color: rgba(15,23,42,.92);
}

.size-modal-close:active{
  transform: translateY(1px);
}

.size-modal-close:focus-visible{
  outline: 2px solid rgba(15,23,42,.25);
  outline-offset: 2px;
}

.size-modal-body{
  padding: 14px;
}

.size-modal-product{
  font-size: 14px;
  color: rgba(15,23,42,.80);
  margin-bottom: 12px;
}

.size-modal-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.size-pill{
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  color: rgba(15,23,42,.88);
}

.size-pill:hover{
  background: rgba(15,23,42,.04);
}

.size-pill:disabled{
  opacity: .6;
  cursor: default;
}

@media (max-width: 1000px){
  .product-grid{
    grid-template-columns: repeat(3, minmax(200px, 1fr));
  }
}

@media (max-width: 820px){
  .search-layout{
    grid-template-columns: 1fr;
  }

  .results-top{
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .results-empty{
    text-align: center;
  }

  .search-summary{
    width: 100%;
    flex: 0 0 100%;
    order: 1;
    text-align: center;
  }

  .sort-wrap{
    width: 100%;
    flex: 0 0 100%;
    order: 2;
    margin-left: 0;
    justify-content: center;
    gap: 10px;
  }

  .filters-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .search-filters{
    position: fixed;
    top: 70px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 180;
    border-radius: 16px;
    transform: translateY(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
    display: flex;
    flex-direction: column;
  }

  .search-filters.is-open{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .filters-head{
    display: flex;
  }

  .filters-body{
    overflow: auto;
    flex: 1;
  }

  .filters-backdrop{
    position: fixed;
    inset: 0;
    z-index: 170;
    background: rgba(15,23,42,.35);
  }

  .product-grid{
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .product-media .img-2{
    opacity: 0 !important;
  }
  .product-card:hover .product-media .img-2{
    opacity: 0 !important;
  }

  .add-to-cart{
    opacity: 1;
    transform: none;
    bottom: 10px;
    top: auto;
  }
}

@media (max-width: 520px){
  .size-modal-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}