/* ===============================
   Base styles
================================ */
body {
  background-color: #fff;
  color: #000;
  font-family: Verdana, sans-serif;
}

/* ===============================
   Navbar & Footer
================================ */
.navbar,
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding: 1rem 2rem;
  background: transparent;
}

.nav-link,
.navbar-brand {
  color: #000;
  cursor: pointer;
}

.nav-link:hover {
  color: #502649;
}

/* ===============================
   Product Grid
================================ */
#product-list-container {
  margin-top: 1rem;
}

/* Ensure equal-height columns */
.row.g-4 > .col {
  display: flex;
}

/* Product item wrapper */
.product-item {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

/* ===============================
   Product Card
================================ */
.product-item .card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #ddd;
  border-radius: 5px;
  overflow: hidden;
  background-color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect */
.product-item .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ===============================
   Product Image (VERIFIED)
================================ */
.product-item .card-img-top {
  width: 100%;
  aspect-ratio: 3 / 4; /* Portrait score cover */
  object-fit: cover;
}

/* ===============================
   Card Body
================================ */
.product-item .card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ===============================
   Typography
================================ */
.product-item .card-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;

  /* Clamp long titles */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-item .card-text {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

@media (max-width: 578px) {
  #product-list-container > .col {
    padding-left: 2rem;
    padding-right: 2rem;
    display: flex;
    justify-content: center;
  }

  .product-item {
    max-width: 260px; /* narrower = taller feel */
    margin: 0 auto 1.75rem;
  }
  .product-item .card-img-top img {
    aspect-ratio: 2 / 3; /* MUCH taller */
  }
}


/* ===============================
   Sort Bar
================================ */
#sort-by {
  min-width: 150px;
}
