/* ================= PRODUCTS PAGE ================= */

.products_page {
  margin-top: 5rem;
}

/* ===== CATEGORY SECTION ===== */

.product_category_section {
  margin-bottom: 5rem;
}

.product_category_section h2 {
  font-size: 2.5rem;

  margin-bottom: 2rem;

  color: var(--color-black);

  position: relative;
}

.product_category_section h2::after {
  content: "";

  display: block;

  width: 90px;

  height: 4px;

  border-radius: 999px;

  background: var(--color-primary);

  margin-top: 0.7rem;
}

/* ===== GRID ===== */

.products_grid {
  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(280px, 320px));

  gap: 2rem;
  justify-content: start;
}

/* ===== PRODUCT CARD ===== */

.product_card {
  background: #fff;

  border-radius: 24px;

  overflow: hidden;

  border: 1px solid #ececec;

  text-decoration: none;

  transition: 0.3s ease;

  color: inherit;

  display: flex;

  flex-direction: column;

  height: 100%;
}

.product_card:hover {
  transform: translateY(-8px);

  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ===== CARD LINK ===== */

.product_card_link {
  text-decoration: none;

  color: inherit;
}

/* ===== ACTIONS ===== */

.product_card_actions {
  padding: 0 1.5rem 1.5rem;

  display: flex;

  flex-direction: column;

  gap: 1rem;

  margin-top: auto;
}

/* ===== Product stock Text ===== */

.product_stock_text {
  color: #16a34a;

  font-size: 1rem;

  font-weight: 700;

  margin-bottom: 0.8rem;
}

/* ===== LOW STOCK ===== */

.product_stock_text.low_stock {
  color: #dc2626;

  animation: lowStockPulse 1.5s infinite;
}

@keyframes lowStockPulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.55;
  }

  100% {
    opacity: 1;
  }
}

/* ===== COMMON BUTTON STYLE ===== */

.product_view_btn,
.add_to_cart_btn {
  width: 100%;

  display: flex;

  align-items: center;

  justify-content: center;

  height: 58px;

  border-radius: 999px;

  font-size: 1rem;

  font-weight: 700;

  text-decoration: none;

  transition: 0.25s ease;
}

/* ===== VIEW BUTTON ===== */

.product_view_btn {
  background: var(--color-primary);

  color: white;

  text-align: center;

  padding: 1rem;

  border-radius: 999px;

  font-weight: 600;

  text-decoration: none;

  transition: 0.25s ease;
}

.product_view_btn:hover {
  background: #1548d4;
}

/* ===== ADD TO CART BUTTON ===== */

.add_to_cart_btn {
  width: 100%;

  text-align: center;

  background: #f9a825;

  color: #111;

  border: none;

  padding: 1rem 1.5rem;

  border-radius: 999px;

  font-size: 1rem;

  font-weight: 700;

  cursor: pointer;

  transition: 0.25s ease;
}

/* HOVER */

.add_to_cart_btn:hover {
  background: #f57f17;

  transform: translateY(-2px);
}

/* ===== IMAGE ===== */

.product_image_container {
  background: #fafafa;

  padding: 2rem;
}

.product_image_container img {
  width: 100%;

  height: 260px;

  object-fit: contain;
}

/* ===== CONTENT ===== */

.product_card_content {
  padding: 1.5rem;
}

.product_card_content h3 {
  font-size: 1.15rem;

  line-height: 1.6;

  font-weight: 600;

  color: var(--color-black);

  margin-bottom: 0.8rem;

  min-height: 50px;
}

/* ===== PRICE ===== */

.product_card_price {
  margin-top: 1rem;

  font-size: 1.7rem;

  font-weight: 700;

  color: #b12704;
}

/* ===== BUTTON ===== */

.product_card:hover .product_view_btn {
  background: #1548d4;
}

/* ===== TABLET ===== */

@media screen and (max-width: 1024px) {
  .products_hero h1 {
    font-size: 3rem;
  }
}

/* ===== MOBILE ===== */

@media screen and (max-width: 600px) {
  .products_page {
    margin-top: 8rem;
  }

  .products_hero h1 {
    font-size: 2.3rem;
  }

  .product_category_section h2 {
    font-size: 2rem;
  }

  .products_grid {
    grid-template-columns: 1fr;
  }
}
