/**
 * Free Products Shortcode Styles
 */

.eb-free-products-container {
    width: 100%;
    margin: 20px 0;
}

.eb-free-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 0;
    padding: 0;
}

.eb-free-products-grid.columns-1 {
    grid-template-columns: 1fr;
}

.eb-free-products-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.eb-free-products-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.eb-free-products-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .eb-free-products-grid {
        grid-template-columns: 1fr;
    }
}

.eb-free-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.eb-free-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.eb-free-product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    display: block;
}

.eb-free-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.eb-free-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.eb-free-product-card:hover .eb-free-product-image img {
    transform: scale(1.05);
}

.eb-free-product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.eb-free-product-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.eb-free-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.eb-free-product-title a:hover {
    color: #0073aa;
}

.eb-free-product-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.eb-free-product-price {
    margin-bottom: 15px;
}

.eb-free-product-price .price {
    font-size: 18px;
    font-weight: 600;
    color: #0073aa;
}

.eb-free-product-actions {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.eb-free-product-enroll-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background: #0073aa;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.eb-free-product-enroll-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.eb-free-product-enroll-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.eb-free-product-enrolled {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background: #28a745;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.eb-free-product-view-course-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background: #fff;
    color: #0073aa;
    text-align: center;
    text-decoration: none;
    border: 2px solid #0073aa;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s ease, color 0.3s ease;
}

.eb-free-product-view-course-btn:hover {
    background: #0073aa;
    color: #fff;
}

/* Loading state */
.eb-free-product-enroll-btn:disabled::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

