.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  padding: 10px;
  justify-items: center;
}

.product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff8d6;
  border: 3px solid #000;
  border-radius: 12px;
  box-shadow: 6px 6px 0px #000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 20px;
  width: 100%;
  position: relative;
  background-image: radial-gradient(#000 1px, transparent 1px);
  background-size: 12px 12px;
}

.product-card:hover {
  transform: scale(1.05) rotate(-1deg);
  box-shadow: 8px 8px 0px #000;
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 3px solid #000;
  border-radius: 8px 8px 0 0;
  background: #fff;
}

.product-details {
  text-align: center;
  padding: 10px;
}

.product-name,
.product-name-english{
  font-family: "Luckiest Guy", cursive;
  font-size: 18px;
  font-weight: normal;
  color: #000;
  text-shadow: 2px 2px 0px #fff;
  letter-spacing: 1px;
  margin: 8px 0;
}


.category-name-arabic,
.category-name-english {
  font-family: "Luckiest Guy", cursive;
  font-size: 18px;
  font-weight: normal;
  color: #000;
  text-shadow: 2px 2px 0px #fff;
  letter-spacing: 1px;
  margin: 8px 0;
}

.product-name-arabic {
  font-family: "Tajawal", sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: #000;
  text-shadow: 2px 2px 0px #fff;
  margin: 8px 0;
}

.product-price {
  font-family: "Luckiest Guy", cursive;
  color: #d32f2f;
  font-size: 18px;
  font-weight: normal;
  padding: 5px 10px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 6px;
  display: inline-block;
  margin-top: 8px;
  box-shadow: 3px 3px 0px #000;
}

.product-price:hover {
  transform: scale(1.1);
  background: #ffeb3b;
}

.new-label {
  position: absolute;
  top: 10px;
  left: -20px;
  background: red;
  color: #fff;
  padding: 4px 12px;
  font-size: 14px;
  font-family: "Luckiest Guy", cursive;
  transform: rotate(-20deg);
  border: 2px solid #000;
  box-shadow: 3px 3px 0px #000;
}

@media (max-width: 375px) {
  .product-grid {
    grid-template-columns: 1fr;
    padding-top: 60px;
  }

  .product-card {
    width: 100%;
  }
}

@media (max-width: 414px) {
  .product-grid {
    grid-template-columns: 1fr;
    padding-top: 50px;
  }

  .product-card {
    width: 100%;
  }
}

@media (min-width: 600px) and (max-width: 900px) {
  .product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-left: 80px;
  }

  .product-card {
    width: 100%;
  }

  .product-image {
    width: 100%;
    height: 125px;
    object-fit: cover;
  }

  .product-name,
  .product-name-arabic {
    font-size: 13px;
  }

  .sub-category-name-english,
  .sub-category-name-arabic {
    font-size: 13px;
  }

  .product-price {
    font-size: 15px;
    padding: 2px 0;
    margin-top: 5px;
  }
}

@media (max-width: 576px) {
  .product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 1px;
    padding-top: 100px;
  }

  .product-card {
    width: 100%;
  }

  .product-image {
    width: 100%;
    height: 130px;
    object-fit: cover;
  }

  .product-name,
  .product-name-arabic {
    font-size: 14px;
  }
  .sub-category-name-arabic {
    padding-right: 10px;
  }
  .product-price {
    font-size: 15px;
    padding: 1px 0;
    margin-top: 4px;
  }
}

@media (min-width: 912px) and (max-width: 1368px) {
  .product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-left: 80px;
  }

  .product-card {
    width: 100%;
  }

  .product-image {
    width: 100%;
    height: 125px;
    object-fit: cover;
  }

  .product-name,
  .product-name-arabic {
    font-size: 15px;
  }

  .sub-category-name-english,
  .sub-category-name-arabic {
    font-size: 13px;
  }

  .product-price {
    font-size: 15px;
    padding: 2px 0;
    margin-top: 5px;
  }
}
