/* ======================================================= */
/* ====== COMPLETE PRODUCT GRID CSS (Homepage + All Products) ====== */
/* ======================================================= */

/* --- Main Section Wrapper --- */
.product-grid-section {
  background-color: #f9fafb; /* Lighter background for product display area */
  padding-top: 4rem; /* py-16 */
  padding-bottom: 4rem;
}
@media (min-width: 640px) {
  /* sm:py-20 */
  .product-grid-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

.product-grid-container,
.product-page-container {
  /* width: 100%; */
  max-width: 80rem; /* max-w-7xl */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem; /* px-4 */
  padding-right: 1rem;
  
}

/* --- Section Title (Both Homepage and Product Page) --- */
.section-title-wrapper {
  text-align: center;
  margin-bottom: 3rem; /* mb-12 */
}
.section-title {
  font-size: 1.875rem; /* text-3xl */
  font-weight: 600; /* font-semibold */
  color: #1f2937; /* text-gray-800 */
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem; /* pb-2 */
}
.title-underline {
  position: absolute;
  bottom: -0.5rem; /* -bottom-2 */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 2px; /* h-0.5 */
  background-color: #2563eb; /* bg-blue-600 */
}
.product-page-section .section-title-wrapper .section-title {
  font-size: 2.25rem; /* h1 on product page will be slightly larger */
}

/* --- Responsive Products Grid Layout --- */
.products-grid {
  display: grid;
  grid-template-columns: 1fr; /* 1 column on mobile */
  gap: 2rem; /* gap-8 */
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}
@media (min-width: 640px) {
  /* sm:grid-cols-2 */
  .products-grid {
    grid-template-columns: repeat(2, minmax(250px, 1fr));
  }
}
@media (min-width: 1024px) {
  /* lg:grid-cols-3 */
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --- Product Card Styling (Exactly from React) --- */
.product-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card {
  background-color: rgba(
    249,
    250,
    251,
    0
  ); /* bg-gray-50/0 - Transparent background */
  border: 1px solid #e5e7eb; /* Subtle border to define cards */
  padding: 1rem; /* p-4 */
  border-radius: 0.5rem; /* rounded-lg */
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  
}

@media (max-width:640px) {
  .products-grid {
    grid-template-columns: repeat(1, minmax(300px, 1fr));
  }

}

.product-card:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /* hover:shadow-lg */
  transform: translateY(-1rem); /* hover:-translate-y-4 */
  border-color: transparent; /* Hide border on hover for a cleaner look */
}

.product-card-image-wrapper {
  display: flex;
  justify-content: center;
  height: 16rem; /* h-64 equivalent, adjust if needed */
  margin-bottom: 0.5rem; /* mb-2 */
  transition: all 0.3s ease-in-out;
  background-color: #fff;
  border-radius: 0.375rem; /* rounded-md */
  padding: 0.5rem; /* Inner padding for the image */
}

.product-card:hover .product-card-image-wrapper {
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1); /* group-hover:shadow-xl */
}

.product-card-image {
  width: 100%;
  height: 100%;
  border-radius: 0.25rem; /* Inner image slightly rounded */
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}

.product-card:hover .product-card-image {
  transform: scale(1.05); /* group-hover:scale-105 */
}

.product-card-title {
  font-weight: 700; /* font-bold */
  color: #1f2937; /* text-gray-800 */
  font-size: 1.125rem; /* text-lg */
  margin-top: 0.5rem;
}

.product-card-description {
  font-size: 0.875rem; /* text-sm */
  color: #6b7280; /* text-gray-500 */
  margin-top: 0.25rem; /* mt-1 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; /* truncate */
}

/* --- No Products Message (If grid is empty) --- */
.no-products-found {
  text-align: center;
  color: #6b7280;
  padding: 4rem 0;
}

.pagination {
  margin-top: 4rem; /* mt-16 */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem; /* space-x-2 */
  padding-bottom: 2rem;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 500;
  color: #4b5563; /* text-gray-600 */
  background-color: white;
  border: 1px solid #d1d5db; /* border-gray-300 */
  border-radius: 0.375rem; /* rounded-md */
  min-width: 2.5rem; /* h-10 w-10 */
  height: 2.5rem;
  padding: 0 0.75rem;
  transition: all 0.2s ease-in-out;
}

.page-link:hover {
  background-color: #f3f4f6; /* hover:bg-gray-100 */
  color: #1f2937; /* hover:text-gray-800 */
}

.page-link.active {
  background-color: #2563eb; /* bg-blue-600 */
  color: white;
  border-color: #2563eb;
  cursor: default;
}
