/**
 * WooCommerce Recently Viewed Products - Styles
 */

/* Recently Viewed Container */
.wc-recently-viewed-container {
    margin: 20px 0;
}

.wc-recently-viewed-container .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.wc-recently-viewed-container .products.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.wc-recently-viewed-container .products.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.wc-recently-viewed-container .products.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.wc-recently-viewed-container .products.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.wc-recently-viewed-container .products.columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

.wc-recently-viewed-container .product {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.wc-recently-viewed-container .product:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #999;
}

/* Recently Viewed Empty State */
.wc-recently-viewed-empty {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
    background: #f9f9f9;
    border-radius: 4px;
}

/* Recently Viewed Count */
.wc-recently-viewed-count {
    display: inline-block;
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 14px;
}

.wc-recently-viewed-count strong {
    color: #333;
    font-weight: 600;
}

/* Track Product Wrapper */
.wc-track-product-wrapper {
    margin: 20px 0;
}

.wc-track-product-wrapper label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
}

.wc-track-product-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Recommendations Section */
.wc-recently-viewed-recommendations {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.wc-recently-viewed-recommendations h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.wc-recently-viewed-recommendations .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.wc-recently-viewed-recommendations .products.columns-1 {
    grid-template-columns: 1fr;
}

.wc-recently-viewed-recommendations .products.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.wc-recently-viewed-recommendations .products.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.wc-recently-viewed-recommendations .products.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Modal Styles */
#wc-recently-viewed-modal .modal-header {
    background: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}

#wc-recently-viewed-modal .modal-title {
    color: #333;
    font-weight: 600;
}

#wc-recently-viewed-modal .modal-body {
    padding: 20px;
}

.wc-recently-viewed-modal-list {
    margin: 20px 0;
}

.wc-recently-viewed-modal-list .card {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.wc-recently-viewed-modal-list .card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wc-recently-viewed-modal-list .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.wc-recently-viewed-modal-list .card-img-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wc-recently-viewed-modal-list .card-body {
    padding: 12px;
}

.wc-recently-viewed-modal-list .card-title {
    margin-bottom: 8px;
}

.wc-recently-viewed-modal-list .card-title a {
    color: #333;
    text-decoration: none;
}

.wc-recently-viewed-modal-list .card-title a:hover {
    color: #0066cc;
}

.wc-recently-viewed-modal-list .card-text {
    margin-bottom: 10px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-recently-viewed-container .products {
        grid-template-columns: repeat(2, 1fr);
    }

    .wc-recently-viewed-container .products.columns-4,
    .wc-recently-viewed-container .products.columns-5,
    .wc-recently-viewed-container .products.columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .wc-recently-viewed-recommendations .products {
        grid-template-columns: repeat(2, 1fr);
    }

    .wc-recently-viewed-recommendations .products.columns-3,
    .wc-recently-viewed-recommendations .products.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .wc-recently-viewed-container .products,
    .wc-recently-viewed-recommendations .products {
        grid-template-columns: 1fr;
    }

    .wc-recently-viewed-modal-list .row {
        display: flex;
        flex-direction: column;
    }

    .wc-recently-viewed-modal-list .col-md-6,
    .wc-recently-viewed-modal-list .col-lg-4 {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Pagination */
.wc-recently-viewed-container .pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.wc-recently-viewed-container .pagination a,
.wc-recently-viewed-container .pagination span {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.wc-recently-viewed-container .pagination a:hover {
    background: #f0f0f0;
    border-color: #999;
}

.wc-recently-viewed-container .pagination .current {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Print Styles */
@media print {
    .wc-track-product-wrapper {
        display: none;
    }
}
