.wcl-custom-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
	width:100%;
}

.wcl-product-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    background: #fff;
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

.wcl-product-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wcl-product-row {
    display: flex;
    align-items: stretch;
    min-height: 120px; /* Minimum height for consistency */
}

.wcl-product-image {
    flex-shrink: 0;
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wcl-product-image a {
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcl-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.wcl-product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    justify-content: space-between;
}

/* Upper row: Name, Price, Add to Cart */
.wcl-product-upper-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.wcl-product-title-section {
    flex: 1;
}

.wcl-product-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

.wcl-product-title a {
    text-decoration: none;
	color: var(--em-link-color);
}

.wcl-product-title a:hover {
    color: var(--em-color__primary);
}

.wcl-product-price-cart {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.wcl-product-price {
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
}

.wcl-add-to-cart {
    min-width: 120px;
}

.wcl-add-to-cart .woocommerce-message {
    margin-bottom: 0px!important;
}

.wcl-add-to-cart .button {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
}

/* Lower row: All other info in line */
.wcl-product-lower-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.wcl-product-sku,
.wcl-product-brand,
.wcl-product-attribute,
.wcl-product-meta,
.wcl-product-categories,
.wcl-product-stock,
.wcl-product-rating {
    margin: 0;
    white-space: nowrap;
}

.wcl-product-description {
    flex: 1;
    color: #555;
    line-height: 1.5;
    margin: 0;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 200px;
}

.wcl-stock-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 3px;
}

.stock-instock {
    background: #d4edda;
    color: #155724;
}

.stock-outofstock {
    background: #f8d7da;
    color: #721c24;
}

/* Loading state for add to cart */
.wcl-adding-to-cart {
    opacity: 0.7;
    pointer-events: none;
}

.wcl-adding-to-cart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: wcl-spin 1s linear infinite;
}

@keyframes wcl-spin {
    to { transform: rotate(360deg); }
}

/* Fade in animation */
.wcl-fade-in {
    animation: wcl-fadeIn 0.5s ease-in-out forwards;
    opacity: 0;
}

@keyframes wcl-fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Success and error messages */
.wcl-success-message,
.wcl-error-message {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 100;
}

.wcl-success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wcl-error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive design */
@media (max-width: 768px) {
    .wcl-product-row {
        flex-direction: column;
        min-height: auto;
    }
    
    .wcl-product-image {
        width: 100%;
        height: 200px;
    }
    
    .wcl-product-upper-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .wcl-product-price-cart {
        justify-content: space-between;
    }
    
    .wcl-add-to-cart {
        min-width: auto;
    }
    
    .wcl-product-lower-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .wcl-product-sku,
    .wcl-product-brand,
    .wcl-product-attribute,
    .wcl-product-meta,
    .wcl-product-categories,
    .wcl-product-stock,
    .wcl-product-rating {
        white-space: normal;
    }
    
    .wcl-product-description {
        min-width: auto;
        -webkit-line-clamp: 3;
    }
}

@media (max-width: 480px) {
    .wcl-product-image {
        height: 150px;
    }
    
    .wcl-product-details {
        padding: 15px;
    }
    
    .wcl-product-title {
        font-size: 16px;
    }
    
    .wcl-product-price {
        font-size: 16px;
    }
}

/* Ecomus theme compatibility */
.ecomus-theme .wcl-product-item {
    border-color: var(--border-color, #e0e0e0);
}

.ecomus-theme .wcl-product-title a {
    color: var(--heading-color, #333);
}

.ecomus-theme .wcl-product-title a:hover {
    color: var(--primary-color, #0073aa);
}

/* Additional Ecomus theme variables support */
.ecomus-theme .wcl-product-item {
    background: var(--background-color, #fff);
}

.ecomus-theme .wcl-product-sku,
.ecomus-theme .wcl-product-brand,
.ecomus-theme .wcl-product-attribute,
.ecomus-theme .wcl-product-meta,
.ecomus-theme .wcl-product-categories {
    color: var(--text-muted, #666);
}

.ecomus-theme .wcl-product-description {
    color: var(--text-color, #555);
}

/* Dark mode support for Ecomus */
@media (prefers-color-scheme: dark) {
    .ecomus-theme .wcl-product-item {
        background: var(--dark-background, #1a1a1a);
        border-color: var(--dark-border, #333);
    }
    
    .ecomus-theme .wcl-product-title a {
        color: var(--dark-heading-color, #fff);
    }
}