.page-title {
  text-align: center;
  padding: 60px 20px;
  background: #eef2ff;
  margin-top: 90px;
}
.page-title h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 30px;
  flex-wrap: wrap;
}

.filters input,
.filters select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.products {
  padding: 40px 10%;
  text-align: center;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 280px));
  justify-content: center;
  gap: 25px;
  margin-bottom: 30px;
}

.product-card {
  position: relative;
  background: white;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
gap:6px;
  display: flex;
  flex-direction: column;
  align-items: center; 
  text-align: center;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
}


.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: transform 0.4s ease;
  cursor: pointer;
}
.product-card img:hover {
  transform: scale(1.08);
}

.product-card h3{
  font-size:18px;
  margin:10px 0 8px;
  color:#111;
  line-height:1.3;
  min-height:48px;  
  max-height:48px;
  overflow:hidden;
}

.price {
  color: #2563eb;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 5px;
  margin-bottom: 8px;
  min-height: 20px;
}

.rating {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  color: #fbbf24;
  font-size: 18px;
  min-height: 22px;
}

.rating i {
  transition:
    transform 0.25s ease,
    color 0.25s ease;
  cursor: pointer;
}

.rating i:hover {
  transform: scale(1.3) rotate(-10deg);
  color: #f59e0b;
}

.product-card button {
  margin-top: 8px;
  padding: 10px;
  border: none;
  background: #2563eb;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  font-weight: 500;
  transition: 0.25s;
}

.product-card button:hover {
  background: #1e4ed8;
}

#loadMore {
  padding: 14px 40px;
  border: none;
  background: linear-gradient(45deg, #111827, #374151);
  color: white;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  transition: 0.3s;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

#loadMore:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.wishlist {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 18px;
  color: #aaa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  padding: 6px;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
  z-index: 9999;
  
}

.wishlist:hover {
  transform: scale(1.2);
}

.wishlist.active {
  color: #e53935;
}

.product-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  background: white;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  width: 100%;
  max-width: 400px;
  position: relative;
  animation: modalPop 0.3s ease;
}

.modal-content img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
  transition: transform 0.4s ease;
}

.modal-content img:hover {
  transform: scale(1.05);
}

.modal-content h2 {
  margin-bottom: 5px;
}

#modalPrice {
  font-size: 22px;
  font-weight: 700;
  color: #2563eb;
  margin-top: 5px;
  margin-bottom: 10px;
  background: #eef2ff;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
}

#closeModal {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
  z-index: 10000;
}

#closeModal:hover {
  background: #ef4444;
  color: white;
  transform: rotate(90deg);
}

#modalCartBtn {
  margin-top: 15px;
  padding: 12px;
  border: none;
  background: linear-gradient(45deg, #2563eb, #1e40af);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  transition: 0.3s;
}

#modalCartBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  background: linear-gradient(45deg, #1e40af, #2563eb);
}



/* MODAL ANIMATION */

@keyframes modalPop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* TOAST */

#toast {
  position: fixed;
  top: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  padding: 14px 20px;
  border-radius: 12px;
  color: white;
  font-weight: 500;
  transition:
    transform 0.5s ease,
    opacity 0.5s ease;
  opacity: 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);

  width: max-content;
  max-width: 90%;
  text-align: center;

  z-index: 20000;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#toast.success {
  background: linear-gradient(45deg, #00c853, #64dd17);
}

#toast.error {
  background: linear-gradient(45deg, #d50000, #ff1744);
}

/* MOBILE */

@media (max-width: 768px) {
  .filters {
    flex-direction: column;
    align-items: center;
  }

  .products {
    padding: 40px 5%;
  }

  .product-card img {
    height: 160px;
  }
  .product-modal {
    align-items: flex-start;
    padding-top: 150px;
    padding-left: 15px;
    padding-right: 15px;
    overflow-y: auto;
  }

  .modal-content {
    max-width: 100%;
    width: 100%;
  }

  .modal-content img {
    height: 180px;
  }

  #closeModal {
    top: 8px;
    right: 8px;
  }
  #toast {
    font-size: 14px;
    padding: 12px 16px;
    top: 100px;
  }
}
