/* 
 * Super Modal Fix and Image Size Consistency for MoleCatalog with Elementor
 * Ensures consistent image sizes and card heights in Elementor environment
 */

/* Fix for beer images in Elementor catalog - maintain consistent size */
.elementor-widget-shortcode .molecatalog-catalog .molecatalog-item-image {
    height: 200px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin-bottom: 15px !important;
    position: relative !important;
}

.elementor-widget-shortcode .molecatalog-catalog .molecatalog-item-image img {
    max-height: 180px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Enforce consistent card height */
.elementor-widget-shortcode .molecatalog-catalog .molecatalog-catalog-item {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    position: relative !important;
}

/* Ensure content fills available space */
.elementor-widget-shortcode .molecatalog-catalog .molecatalog-item-content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

/* Push button to bottom */
.elementor-widget-shortcode .molecatalog-catalog .molecatalog-item-button-container {
    margin-top: auto !important;
}

/* Fix for placeholder images */
.elementor-widget-shortcode .molecatalog-catalog .molecatalog-placeholder-image {
    max-height: 180px !important;
    width: auto !important;
    margin: 0 auto !important;
}

/* Make grid more consistent */
.elementor-widget-shortcode .molecatalog-grid {
    display: grid !important;
    grid-gap: 20px !important;
}

/* Ensure all columns are equal height */
.elementor-widget-shortcode .molecatalog-grid.molecatalog-grid-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .elementor-widget-shortcode .molecatalog-grid.molecatalog-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .elementor-widget-shortcode .molecatalog-grid.molecatalog-grid-3 {
        grid-template-columns: 1fr !important;
    }
}
