/* WooCommerce Recently Viewed Products Styles */

.wc-recently-viewed-products {
    margin: 20px 0;
    clear: both;
}

.wc-recently-viewed-title {
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.wc-recently-viewed-products .woocommerce {
    margin: 0;
}

.wc-recently-viewed-products .products {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wc-recently-viewed-products .products.columns-1 .product {
    width: 100%;
}

.wc-recently-viewed-products .products.columns-2 .product {
    width: calc(50% - 10px);
}

.wc-recently-viewed-products .products.columns-3 .product {
    width: calc(33.333% - 14px);
}

.wc-recently-viewed-products .products.columns-4 .product {
    width: calc(25% - 15px);
}

.wc-recently-viewed-products .products.columns-5 .product {
    width: calc(20% - 16px);
}

.wc-recently-viewed-products .products.columns-6 .product {
    width: calc(16.666% - 17px);
}

.wc-recently-viewed-products .product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.wc-recently-viewed-products .product:hover {
    border-color: #ccc;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.wc-recently-viewed-products .product a {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 15px;
}

.wc-recently-viewed-products .product a:hover {
    text-decoration: none;
}

.wc-recently-viewed-products .product-image {
    margin-bottom: 10px;
    line-height: 0;
}

.wc-recently-viewed-products .product-image img {
    width: 100%;
    height: auto;
    max-width: 150px;
    transition: transform 0.3s ease;
}

.wc-recently-viewed-products .product:hover .product-image img {
    transform: scale(1.05);
}

.wc-recently-viewed-products .woocommerce-loop-product__title {
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0;
    line-height: 1.4;
    color: #333;
}

.wc-recently-viewed-products .price {
    font-weight: bold;
    color: #77a464;
    font-size: 16px;
}

.wc-recently-viewed-products .price del {
    color: #999;
    font-weight: normal;
    margin-right: 5px;
}

.wc-recently-viewed-empty {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-recently-viewed-products .products.columns-3 .product,
    .wc-recently-viewed-products .products.columns-4 .product,
    .wc-recently-viewed-products .products.columns-5 .product,
    .wc-recently-viewed-products .products.columns-6 .product {
        width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .wc-recently-viewed-products .products .product {
        width: 100% !important;
    }
    
    .wc-recently-viewed-products .products {
        gap: 15px;
    }
    
    .wc-recently-viewed-title {
        font-size: 1.3em;
    }
}

/* Widget Styles (if used in sidebar) */
.widget .wc-recently-viewed-products {
    margin: 0;
}

.widget .wc-recently-viewed-products .products {
    gap: 15px;
}

.widget .wc-recently-viewed-products .product {
    width: 100% !important;
    margin-bottom: 15px;
}

.widget .wc-recently-viewed-products .product a {
    padding: 10px;
}

.widget .wc-recently-viewed-products .woocommerce-loop-product__title {
    font-size: 13px;
}

.widget .wc-recently-viewed-products .product-image img {
    max-width: 80px;
}
