/* Styles for the WooCommerce Related Brand/Category Products Widget */

/* Common styles for all related products lists */

/* Related Widget */

.related-proizvodac-category-list {
    list-style: none; /* Remove bullet points */
    padding: 0;
    margin: 0;
}

.related-product {
    display: flex; /* Use flexbox for layout */
    align-items: center; /* Align items vertically in the center */
    margin-bottom: 5px; /* Add space between products */
	background-color: white;
	border-radius: 5px;
}

.related-product .product-image {
    margin-right: 15px; /* Add space between image and details */
	width:25%!important;
	min-width: 25%!important;
}

.related-product .product-image img {
	width: 70px!important;
	height:70px!important;
}

.related-product .product-details {
    flex-grow: 1; /* Allow details to take up remaining space */
	  text-align: left;
    padding: 6px
}

.related-product .product-title {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.related-product .product-price {
    display: block;
}
/**/
.related-products {
    list-style: none;
    padding: 0;
    margin: 0; /* Remove default ul margin */
}

.related-product {
    text-align: center;
}

/*.related-product .product-image {
    display: block;
    margin-bottom: 5px;
}

.related-product .product-image img {
    width: 100%;
    height: auto;
    object-fit: contain; 
}

.related-product .product-details {
    padding: 0 5px; 
}*/

.related-product .product-title {
    display: -webkit-box; /* Required for line clamping */
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical; /* Required for line clamping */
    overflow: hidden; /* Hide overflow content */
    text-overflow: ellipsis; /* Add ellipsis for overflowed text */
    font-size: 1em;
    margin-bottom: 3px;
    line-height: 1.2em; /* Adjust based on your font-size for proper line height */
    max-height: 2.4em; /* (line-height * number of lines) - 1.2em * 2 = 2.4em */
    text-decoration: none; /* Remove underline from link */
    color: inherit; /* Inherit color from parent or define your own */
}
.related-product .product-title:hover {
    text-decoration: underline; /* Add underline on hover */
}

.related-product .product-price {
    display: block;
    font-size: 0.9em;
    color: #777;
    font-weight: bold;
}

/* Media queries for responsiveness (now overriding the inline columns) */
@media (max-width: 768px) {
    .related-products {
        grid-template-columns: repeat(2, 1fr) !important; /* Force 2 columns on tablets */
    }
}

@media (max-width: 480px) {
    .related-products {
        grid-template-columns: 1fr !important; /* Force 1 column on phones */
    }
}

/* Styles for the title of the widget */
.related-brand-category-container .related-widget-title {
    text-align: center; /* or left, right as desired */
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #333;
}