/* Styling for the new Product Group Links */

.pgl-custom-links-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex; /* Enable flexbox for horizontal layout */
  flex-wrap: wrap; /* Allow items to wrap to the next line */
  gap: 15px; /* Spacing between items */
}

.pgl-custom-links-list h2 {
  font-size: 1.2em;
  margin-bottom: 15px;
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
  width: 100%; /* Ensure heading spans full width */
}

/* Individual link item styling */
.pgl-link-item {
  flex: 0 0 100px; /* Base width: 100px wide */
  text-align: center;
  border: 1px solid #eee;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.pgl-link-item:hover {
  border-color: #0073aa; /* Highlight border on hover */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pgl-link-item a {
  text-decoration: none;
  color: inherit;
  display: flex; /* Flex on the link itself */
  flex-direction: column; /* Stack image and title vertically */
  align-items: center;
  justify-content: space-between;
  height: 100%; /* Ensure the link fills the list item */
}

/* Image styling */
.pgl-link-thumbnail {
  width: 80px; /* Control image width */
  height: 80px; /* Control image height */
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 2px;
}

/* Title styling */
.pgl-link-title {
  font-size: 0.85em;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit title to two lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
