@import url("global.css");
@import url("header.css");
@import url("footer.css");
@import url("slider.css");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.products-page {
  width: 97%;
  margin: auto;
  height: auto;
}
/*done*/
.category-container {
  width: 100%;
  padding: 0px 18px;
  background-color: #fff;
}

/*done*/
.category-info {
  width: 100%;
  text-align: center;
  margin-top: 30px;
  margin-bottom: 12px;
}

.category-name {
  margin-bottom: 12px;
  color: rgb(34, 34, 34);
  font-size: 31.01px;
  font-weight: 300;
  letter-spacing: 0.46515px;
}

.category-description {
  color: #595959;
  font-size: 12.99px;
  margin: 0px 32px;
}
.sub-categories-container {
  width: 100%;
  height: 100%;
  margin-top: 24px;
  margin-bottom: 6px;
 
}
.sub-category-cards {
  width: 90%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 15px 2vw;
  margin: auto;
  padding: 0px 4vw;
}

.sub-category-min{
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.subCategory-card {
  width: 100%;
  height: 20vw;
}
.subCategory-card img {
  width: 100%;
  height: 90%;
  border-radius: 6px;
  object-fit: cover;
}
.subCategory-card:hover .sub-category-img {
  opacity: 0.9;
}
.subCategory-card:hover .sub-category-name {
  text-decoration: underline;
  color: #333;
}

.sub-category-name {
  color: black;
  text-align: center;
  font-size: 13px;
}
.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.show-more-btn {
  width: 140px;
  height: 40px;
  border-radius: 24px;
  font-size: 16px;
  background-color: #0e0e0e17;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  color: black;
  
}

.show-more-btn:hover {
  box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.8);
}

.filter-section {
  margin-bottom: 10px;
  margin-top: 30px;
}
.filter-btn {
  width: 100px;
  height: 35px;
  border-radius: 20px;
  font-size: 12.99px;
  background-color: white;
  border: 2px solid black;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  color: black;
}

.filter-btn:hover {

  box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.8);
}




.filter-panel{
    position: fixed;
    top: 0;
    left: -450px; 
    width: 450px;
    height: 100%;
    background-color: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 30px;
    transition: left 0.3s ease; 
    z-index: 999;
    display: flex;
    flex-direction: column;
  }

  .filter-panel.active {
    left: 0;
  }
  .filter-close {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    background: transparent;
    border: none;
    line-height: 1;
  }

.filter-close:hover {
    color: #000; 
  }

  .filter-panel h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 20px;
    
  }

.select-wrapper {
  position: relative;
  display: inline-block;
  border: 1px solid #777;
  border-radius: 30px;
  overflow: hidden; 
 width: 120px;
 height: 30px;
 transition: box-shadow 0.3s ease, transform 0.2s ease;
 margin-left: 5px;
}

.select-wrapper select.cat-filter {
  border: none;  
  width: 100%;
  height: 30px;
  background: transparent;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: auto;
  text-align: center;
  outline: none;
  color: #777;
}

.select-wrapper:hover{
    box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.8);
    transform: scale(1.01);
}

/* Custom arrow for the wrapper */
.select-wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml;utf8,<svg fill='%23000000' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat center center;
  background-size: 16px;
}

  .filter-content {
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px; 
  }

  .filter-group {
    margin-bottom: 0px;
  }

  .filter-group h3 {
    font-size: 14px;
    font-weight:bold;
    margin-bottom: 8px;
  }

  .filter-group p {
    margin-left: 24px; 
    font-size: 12px;
    color: #777;
    margin-top: 4px;
  }

  .price-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    margin-left: 24px; 
  }

  .price-range input {
    width: 60px;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }

  .filter-group select {
    margin-left: 24px;
    margin-top: 6px;
    padding: 4px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }

  .filter-footer {
    display: flex;
    justify-content: space-between;
  }

  .cancel-btn,
  .apply-btn {
    padding: 10px 20px;    
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 20px;
  }

  .cancel-btn {
    background-color: #fff;
    color: #000;
    border: 1px solid #000;
    width: 200px;
  }

  .apply-btn {
    background-color:black;
    color: #fff;
    border: 1px solid black;
    width :200px;
    margin-left: 10px;
  }

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background: rgba(0, 0, 0, 0.4);
    
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    
    z-index: 998;
  }
  
  .overlay.active {
    opacity: 1;
    visibility: visible;
  }


  .filter-group label {
    margin-left: 24px;
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    cursor: pointer;
  }

  .filter-group input[type="radio"],.filter-group input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
  }
.fa-sliders {
  margin-right: 5px;
}

#products-container {
  width: 100%;
  height: 100%;
  margin-top: 24px;
  margin-bottom: 6px;
}
.product-cards {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 15px 1vw;
}
.product-card {
  position: relative;
  transform: translateY(25px); 
   transition: opacity 1s ease, transform 1s ease;
   cursor: pointer;
   border-radius: 12px;
   
}
.product-card:hover {
  box-shadow: 0px 1px 3px 0px #00000065, 0px 4px 5px 4px #00000026;
}
.no-products{
  display: flex ;
  justify-content: center;  
  align-items: center;
}


.product-card.show {
  opacity: 1;
  transform: translateY(0);
}

.product-image {
  width: 100%;
  height: 23vw;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  
}


.product-favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 15px;
  opacity: 0;
  color: black;
  border-radius: 15px;
  border: 1px solid white;
  padding: 5px;
  transition: transform 0.5s ease-in-out;
  background-color: white;
}

.product-card:hover .product-favorite {
  animation: favorite-animation 0.5s forwards;
}
@keyframes favorite-animation {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
.product-favorite:hover {
  box-shadow: 0px 0px 5px 3px #00000040;
}

.product-favorite:hover::after {
  transform: scale(1.09);
}

.product-body {
  width: 100%;
  padding: 5px;
  line-height: 1.4;
  

}

.product-card .product-name {
  font-size: 14px;
  color: #333;
  font-weight: normal;
  margin: 3px 0;
  line-height: 1.3;
}
.oneline {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.product-card .product-info {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}
.product-card .product-rating {
  font-size: 13px;
  color: #333;
}
.product-card .product-rating i {
  color: #f2c200; 
  margin-right: 2px;
}
.product-card .product-rating i:last-of-type {
  margin-right: 4px;
}
.product-card .product-after-discount {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-right: 4px;
  display: block;
}
.product-card s {
  color: #0f743b;
  margin: 0 4px;
  font-weight: lighter;
}
.product-card .product-current-price {
  font-size: 14px;
  font-weight: lighter;
  color: #0f743b;
  display: block;
}

.product-card .product-vendor {
  font-size: 12px;
  color: #777;
  margin: 5px 0px;
  display: inline-block;
 
}
.product-card .free-shipping {
    display: inline-block;
  font-size: 12px;
 border-radius: 12px;
  background-color:#a0e193; 
  font-weight: 500;
  color: black;
  padding: 5px;

}
.product-discount {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  margin-left: 8px;
  text-decoration: line-through;
}


.arrow{
  content: "";
  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgYXJpYS1oaWRkZW49InRydWUiIGZvY3VzYWJsZT0iZmFsc2UiPjxwYXRoIGQ9Ik0xMCwxN2ExLDEsMCwwLDEtLjcwNy0xLjcwN0wxMi41ODYsMTIsOS4yOTMsOC43MDdhMSwxLDAsMCwxLDEuNDE0LTEuNDE0TDE1LjQxNCwxMmwtNC43MDcsNC43MDdBMSwxLDAsMCwxLDEwLDE3WiI+PC9wYXRoPjwvc3ZnPgo=) !important;
  background-position: 50%;
  background-size: 100%;
  width: 24px;
  height: 24px;
}
.flex-box{
  display: flex;
  align-items: center;
}
.cat-root{
  cursor: pointer;
  font-size: 14px;
  color: #777;
}

/*selected*/
.seleted{
  margin-bottom: 0px;
}
.seleted-in{
  padding: 12px 0px;
  display: flex;
  align-items: center;
}
.seleted-in h3{
  font-size: 14px;
  font-weight: 500;
  color: #6a7282;
}
.seleted-in .line{
  width: 1px;
  height: 20px;
  background-color: #d1d5dc;
  margin-left: 16px;
}
.seleted-in .select-item{
  margin-left: 10px;
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 14px;
  padding: 6px 8px 6px 12px;
  border: 1px solid #000;
  border-radius: 15px;
  background-color: #000;
  cursor: pointer;
}
.seleted-in .select-item button{
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #99a1af;
  margin-left: 4px;
}
.seleted-in .select-item:hover button{
  background-color: #efefef;
}
.seleted-in .select-item svg{
  width: 8px;
  height: 8px;
}

/*sort*/
.sort-menu {
  width: 300px;
}
.hide {
  display: none;
}
.sort-menu-li {
  padding: 12px 18px;
  font-size: 13px;
  transition: all 0.1s linear;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sort-menu-li:last-child {
  border-radius: 0 0 12px 12px;
}
.sort-menu-li:hover {
  background-color: #eaeaea;
}
.sort-menu-li::after {
  content: "";
  background-image: url("/public/images//icons/check.svg");
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: 100%;
  width: 12px;
  height: 12px;
  margin-right: -2px;
  display: none;
}
.sort-menu-li.checked::after {
  display: block;
}
.sort-menu-li.checked {
  background-color: #f2f2f2;
}

/* mediium screen done  */
@media (max-width: 900px) {
  .sub-categories-container {
    width: 100%;
    height: auto;
  }
  .sub-category-cards {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 25px 2vw;
    margin: auto;
    padding: 0px 1vw;
    margin-bottom: 40px;
  }
  .product-cards {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 15px 2vw;
  }
  .product-image {
    height: 27vw;
    
  }
  .no-products{
    display: flex ;
    justify-content: center;  
    align-items: center;
  }
  .product-card .free-shipping{
    font-size: 10px;
    padding: 3px;
  }
  
  
  
}

/*small screen done*/
@media (max-width: 640px) {
  .category-container {
    width: 100%;
    padding: 0px 4px;
  }
  .category-info {
    width: 100%;
    text-align: left;
    margin-bottom: 4px;
  }
  .category-name {
    margin-bottom: 6px;
  }
  .category-description {
    margin: 0px;
  }
  .sub-categories-container {
    margin-top: 6px;
  }
  .sub-category-cards {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 10px;
    padding: 12px;
  }
  .subCategory-card {
    width: 100%;
    height: 30vh;
  }
  .product-cards {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 35px 2vw;
  }
  .show-more-btn{
    margin-top: 10px;
  }
  .product-image {
    height: 30vw;
    
  }
  .product-body{
    font-size: 14px;
    
  }
}
