/* ===============================
   Category Page Styles
   =============================== */

/* --- Page Titles --- */
.category-title {
  margin: 20px;
  font-size: 24px;
  color: #222;
  cursor: default;
  border-bottom: 2px solid #e63946;
  display: table;
  margin: 30px auto;
  padding-bottom: 6px;
  animation: pop 0.5s ease forwards;
}

.category-title-P {
  display: table;
  margin: 0px auto;
  font-size: 14px;
  cursor: default;
  font-weight: normal;
  animation: pop 0.5s ease forwards;
}

.category-title-T {
  color: #219ebc;
}

.category-title-N {
  border-bottom: 1px solid red;
}

/* --- Empty Message --- */
.empty-message {
  margin: 50px;
  border-bottom: 2px solid red;
  font-size: 20px;
  text-align: center;
}

/* --- Grid Layout --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
  justify-items: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  margin: 20px;
}

/* --- Product Card --- */
.product-card-category {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 300px;
  animation: pop 0.5s ease forwards;
}

.product-card-category:hover {
  transform: translateY(-4px);
  box-shadow: 0 0px 10px rgba(0, 0, 0, 0.6);
}

/* --- Animation --- */
@keyframes pop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- Product Link --- */
.product-link {
  color: inherit;
  text-decoration: none;
  display: block;
  padding: 10px;
}

/* --- Product Image --- */
.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

/* --- Product Title --- */
.product-card h2 {
  font-size: 16px;
  margin: 10px 0;
  color: #111;
  text-align: center;
  height: 40px;
}

/* --- Price Box --- */
.price-box {
  text-align: center;
}

.old-price {
  text-decoration: line-through;
  color: #888;
  font-size: 0.9rem;
  margin-left: 5px;
}

.new-price {
  color: #e60023;
  font-weight: bold;
}

/* --- Card Footer --- */
.card-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 10px 10px;
  border-top: 1px solid #ddd;
}

/* --- Add to Cart Button --- */
.add-to-cart-btn {
  background-color: #74c69d;
  color: white;
  border: 1px solid #74c69d;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  text-align: center;
  transition: 0.2s ease-in;
}

.add-to-cart-btn:hover {
  background-color: white;
  color: #74c69d;
}

/* --- Edit/Delete Buttons --- */
.btn-edit {
  top: -210px;
  left: 102px;
}
.btn-delete {
  top: -235px;
  right: 113px;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  gap: 8px;
  margin: 20px 50px;
}

.pagination button,
.pagination a {
  background-color: #eee;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  color: #000;
  transition: 0.2s ease-in;
}

.pagination button:hover,
.pagination a:hover {
  background-color: #c7c7c7;
}

.pagination button.active,
.pagination a.active {
  background-color: #e63946;
  color: #fff;
}

.pagination .pagination-perv,
.pagination .pagination-next {
  background-color: #eee;
}

.pagination .pagination-perv:hover,
.pagination .pagination-next:hover {
  background-color: #c7c7c7;
}

/*! !*/
@media (max-width: 400px) {
  .product-card-category {
    height: 330px !important;
  }
}
