/* -------------------------------
   STYLES FOR JACKET LISTS ON INDEX, JACKETS, MEN'S AND WOMEN'S PAGES
-------------------------------- */

/* Gender filtering */
#filter-container {
  text-align: center;
  margin-bottom: 20px;
  padding: 10px;
}

#gender-filter {
  padding: 8px;
  width: 200px; /* Match the width of the product cards */
  border: 1px solid var(--design-details-color-light);
  border-radius: 4px;
}

/* Hides the gender filter label visually but keeps it accessible for screen readers:*/
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* List of products wrapper */
#product-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

/* Product card */
.product {
  display: flex;
  flex-direction: column; /* Stack elements vertically */
  align-items: center; /* Center align all items */
  border: 1px solid var(--design-details-color-light);
  border-radius: 8px;
  padding: 16px;
  background-color: var(--main-white-color);
  width: 250px;
  text-align: center;
  height: 350px;
  box-sizing: border-box; /* Ensure padding and border are included in the width/height */
}

/* Product card hover effect */
.product:hover {
  transform: scale(1.02); /* Slightly enlarge the product card on hover */
  transition: transform 0.2s; /* Smooth transition effect */
  cursor: pointer;
}

/* Product image */
.image-container {
  width: 100%; /* Fill the container width */
  height: 200px; /* Fixed height for the image container */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Hide overflow to prevent cropping */
  flex-grow: 1;
}

.product img {
  width: 100%; /* Set the image width to fill the container */
  height: 100%; /* Set the image height to fill the container */
  object-fit: contain; /* Ensure the entire image is visible while maintaining aspect ratio */
  max-height: 100%; /* Prevent the image from exceeding the container height */
}

/* Product prices */
.price-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* Regular price */
.price {
  color: var(--main-blue-color);
  font-weight: bold;
  font-size: 1.8rem;
}

/* On sale price */
.discounted-price {
  color: var(--discounted-price-color);
  font-weight: bold;
  font-size: 1.8rem;
  margin-bottom: 0;
}

/* Regular price when on sale */
.original-price {
  color: grey;
  text-decoration: line-through;
  font-size: 1.4rem;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 3px;
}

/* On sale badge */
.on-sale-badge {
  background-color: var(--on-sale-badge-color);
  color: var(--main-white-color);
  font-size: 1.4rem;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 15px;
}

/* -------------------------------
   MEDIA QUERIES
-------------------------------- */

/* TABLET (768px - 1024px) */
@media screen and (min-width: 768px) {
  /* H1 spacing on women's and men's page */
  .women h1,
  .men h1 {
    margin: 25px 0;
  }

  .product {
    width: 300px;
    height: 400px;
  }

  #product-list {
    gap: 30px;
  }

  .price-wrapper {
    gap: 5px;
  }

  .original-price,
  .on-sale-badge {
    font-size: 1.6rem;
  }
}

/* DESKTOP (1024px and up) */
@media screen and (min-width: 1024px) {
  /* H1 spacing on women's and men's page */
  .women h1,
  .men h1 {
    margin: 35px 0;
  }

  .price,
  .discounted-price {
    font-size: 2rem;
  }

  .original-price,
  .on-sale-badge {
    font-size: 1.8rem;
  }

  .product {
    height: 450px;
  }
}
