@font-face {
  font-family: vazir;
  src: url("../fonts/Vazirmatn-VariableFont_wght.ttf");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;

  font-family: vazir, Arial, sans-serif;

  background-color: #f5f5f5;
}

/* ---------------- سبد خرید گوشه صفحه ---------------- */

.floating-cart {
  position: fixed;

  top: 20px;
  left: 20px;

  z-index: 1000;

  display: flex;
  align-items: center;

  gap: 8px;

  padding: 12px 18px;

  background-color: white;

  color: #222;

  text-decoration: none;

  border-radius: 12px;

  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);

  transition: 0.2s;
}

.floating-cart:hover {
  transform: translateY(-2px);

  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cart-icon {
  font-size: 23px;
}

.cart-text {
  font-size: 15px;
  font-weight: bold;
}

.cart-badge {
  min-width: 23px;
  height: 23px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background-color: #d71920;

  color: white;

  font-size: 12px;
}

/* ---------------- عنوان ---------------- */

.hampa-products {
  width: 94%;
  max-width: 1500px;

  margin: 0 auto;

  padding: 100px 0 50px;
}

.products-title {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 25px;

  margin-bottom: 35px;
}

.products-title img {
  width: 100px;

  height: 60px;

  object-fit: contain;
}

.products-title h1 {
  margin: 0;

  font-size: 32px;

  color: #222;
}

/* ---------------- فیلتر ---------------- */

.filter-section {
  display: flex;

  justify-content: center;

  flex-wrap: wrap;

  gap: 10px;

  margin-bottom: 35px;
}

.filter-button {
  border: 1px solid #ddd;

  background-color: white;

  color: #333;

  padding: 10px 18px;

  border-radius: 8px;

  font-family: inherit;

  cursor: pointer;

  transition: 0.2s;
}

.filter-button:hover {
  background-color: #eee;
}

.filter-button.active {
  background-color: #222;

  color: white;
}

/* ---------------- شبکه محصولات ---------------- */

.products-container {
  display: grid;

  grid-template-columns: repeat(5, 1fr);

  gap: 20px;
}

/* ---------------- کارت محصول ---------------- */

.product-card {
  display: flex;

  flex-direction: column;

  background-color: white;

  border-radius: 14px;

  padding: 15px;

  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);

  transition: 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);

  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.12);
}

.product-card > img {
  width: 100%;

  height: 210px;

  object-fit: contain;

  margin-bottom: 12px;
}

.product-card h2 {
  margin: 5px 0 10px;

  font-size: 17px;

  color: #222;
}

.product-price {
  margin: 0 0 15px;

  font-size: 17px;

  font-weight: bold;

  color: #d71920;
}

/* ---------------- دکمه افزودن ---------------- */

.add-to-cart {
  width: 100%;

  margin-top: auto;

  padding: 11px 8px;

  border: none;

  border-radius: 8px;

  background-color: #222;

  color: white;

  font-family: inherit;

  font-size: 14px;

  cursor: pointer;

  transition: 0.2s;
}

.add-to-cart:hover {
  background-color: #444;

  transform: translateY(-1px);
}

.add-to-cart.added {
  background-color: #287a3e;
}

/* ---------------- واکنش‌گرا ---------------- */

@media (max-width: 1199px) {
  .products-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 991px) {
  .products-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .products-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-title h1 {
    font-size: 25px;
  }

  .products-title img {
    width: 75px;
  }

  .floating-cart {
    top: 12px;
    left: 12px;

    padding: 9px 12px;
  }

  .cart-text {
    display: none;
  }
}

@media (max-width: 400px) {
  .products-container {
    grid-template-columns: 1fr;
  }

  .products-title {
    gap: 10px;
  }

  .products-title img {
    width: 55px;
  }

  .products-title h1 {
    font-size: 21px;
  }
}

.back-home {
  display: inline-block;
  padding: 10px 20px;
  margin: 20px;
  border-radius: 10px;

  background: #222;
  color: #fff;

  text-decoration: none;
  font-size: 15px;
  font-weight: 700;

  transition: 0.3s;
}

.back-home:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}
