.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    justify-items: center;
    width: 100%;
    margin-top: 50px;
}

.product-card-blog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 320px;
}

.product-card-blog:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-desc {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0 0 15px 0;
    line-height: 1.5;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.price {
    font-size: 15px;
    font-weight: bold;
    color: #2ecc71;
}

.buy-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s ease;
    margin: auto;
}

.buy-btn:hover {
    background: #2980b9;
    color:#fff;
}

.products-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.preview-product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
}

.preview-product-item:hover {
    background: #f5f5f5;
}

.preview-product-item img {
    border-radius: 4px;
    margin-bottom: 5px;
}

.preview-product-item span {
    font-size: 12px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.product-error {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-style: italic;
}

@media (max-width: 768px) {
    .products-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .product-card {
        max-width: 100%;
    }
}