/* Import Montserrat and Roboto Fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Roboto:wght@400;500;700&display=swap');

.related-products-container {
  padding: 20px;
  background-color: #fff;
  margin-top: 20px;
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

.related-products-heading{
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    color: #003b4d;
}

.related-product-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  cursor: pointer;
}

.related-item-card {
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.related-item-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.related-item-title-wrapper {
  padding: 10px;
  text-align: center;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.related-product-title {
  margin: 0;
  font-size: 0.9rem;
  color: #333;
  font-family: 'Montserrat', sans-serif;
}

.related-product-description-wrapper {
  padding: 10px;
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.related-product-description {
  margin: 0;
  font-size: 0.8rem;
  color: #666;
  line-height: 1.2;
  font-family: 'Roboto', sans-serif;
}

.related-icon-wrapper {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 10px;
}

.related-icon-wrapper i {
  color: #003b4d;
  font-size: 18px;
  cursor: pointer;
}

.related-see-more-button {
  background-color: #003b4d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  margin: 20px auto;
  display: block;
}

.related-see-more-button:hover {
  background-color: #005566;
}

/* Hidden Class for "More/Less" Functionality */
.hidden {
  display: none;
}

/* Responsive Design */
@media screen and (min-width: 1024px) {
  .related-products-grid {
    grid-template-columns: repeat(5, 1fr); /* Ensure 5 cards in a row on desktop */
  }
}

@media screen and (max-width: 1024px) {
  .related-products-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Stack cards on mobile */
  }

  .related-item-card {
    height: 150px; /* Reduced height for mobile */
  }

  .related-product-title {
    font-size: 0.8rem;
  }

  .related-product-description {
    font-size: 0.7rem;
  }

  .related-see-more-button {
    padding: 8px 16px;
    font-size: 14px;
  }
}

@media screen and (max-width: 768px) {
  .related-products-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Tighter layout on smaller mobile */
  }

  .related-products-heading{
    font-size: 1em;
  }

  .related-item-card {
    height: 140px;
  }

  .related-product-title {
    font-size: 0.7rem;
  }

  .related-product-description {
    font-size: 0.6rem;
    min-height: 35px;
  }

  .related-see-more-button {
    padding: 6px 12px;
    font-size: 12px;
  }
}