/* PSBlog Product Display - AngarTheme Integration */

/* Main container for linked products */
.psblog-linked-products {
    margin: 2.5rem 0;
    position: relative;
}

/* Title styling */
.psblog-products-title {
    font-size: 1.5rem;
    margin-bottom: 1.875rem;
    font-weight: 600;
    color: #232323;
    text-align: center;
    position: relative;
    padding-bottom: 0.625rem;
}

.psblog-products-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3.125rem;
    height: 2px;
    background: #2fb5d2;
}

/* Full-width container for products */
.psblog-products-fullwidth {
    width: 100%;
    margin: 0 auto;
}

/* Let AngarTheme handle the product grid but ensure proper centering */
.psblog-linked-products .products {
    margin: 0 -0.625rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center products when few */
}

.psblog-linked-products .product-miniature {
    margin: 0 0.625rem;
}

/* Responsive adjustments for different product counts using JavaScript classes */
@media (min-width: 1200px) {
    /* Single product - centered without width constraint */
    .psblog-linked-products .products.products-single {
        justify-content: center;
    }
    
    /* Two products - centered */
    .psblog-linked-products .products.products-double {
        justify-content: center;
    }
    
    /* Three products - centered */
    .psblog-linked-products .products.products-triple {
        justify-content: center;
    }
    
    /* Four or more products - full width grid */
    .psblog-linked-products .products.products-grid {
        justify-content: flex-start;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1199px) {
    .psblog-linked-products .products.products-single {
        justify-content: center;
    }
    
    .psblog-linked-products .products.products-double {
        justify-content: center;
    }
}

/* Mobile - all products centered */
@media (max-width: 767px) {
    .psblog-linked-products .products {
        justify-content: center;
    }
}

/* Spacing for different positions */
.psblog-products-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #dee2e6;
}

.psblog-products-top {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #dee2e6;
}

/* Sidebar layout */
.psblog-products-sidebar .products {
    display: block;
}

.psblog-products-sidebar .product-miniature {
    margin-bottom: 1.5rem;
    max-width: 257px;
}

/* Hide quick view by default (AngarTheme pattern) */
.psblog-linked-products .quick-view {
    display: none;
}

.psblog-linked-products .product-miniature:hover .quick-view {
    display: block;
}

/* Ensure proper z-index for flags */
.psblog-linked-products .product-flags-plist {
    z-index: 2;
}

/* Ensure AngarTheme dimensions are respected */
.psblog-linked-products .thumbnail-container {
    width: 257px !important;
    height: 318px !important;
    margin-bottom: 1.563rem;
}

.psblog-linked-products .product-miniature {
    width: auto !important;
    min-width: 257px;
    flex: 0 0 auto;
}

/* Ensure proper product display */
.psblog-linked-products .products {
    gap: 1.25rem;
}

/* Remove any width constraints that might affect products */
.psblog-products-fullwidth .products,
.psblog-linked-products .products {
    max-width: none !important;
    width: auto !important;
}